package cate.game.role.pvp.throne.msg;

import cate.common.table.d.GDFight;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTB;

@ClientMsg(title = "我的淘汰赛战报 の 请求")
public class MyTBKoReportReq implements MsgInput {


    @Override
    public void execute(GameBody game, ClientContext cc) {
        MyTBKoReportResp resp = new MyTBKoReportResp();
        resp.reports = game.pvp.throne.data.holder.findRoleReports(cc.getRole());
        resp.reports.removeIf(report -> report.winner == GDFight.Team.NONE);
        cc.getRole().sendNow(resp);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTB.MY_KO_REPORT_REQ;
    }
}
